clear all

use "$root\data\use.dta", replace


*************************** summary statistics ********************************
* corn
tabstat corn_pplanted corn_plratio corn_hratio corn_yield corn_production c_d*_b c_d*_p c_d*_g if irrigated_ratio<0.1 & N_year_corn>10 & lng>-100 & !missing(c_d0_b), statistics(count mean sd) columns(statistics) 

* soybeans
tabstat soybeans_pplanted soybeans_plratio soybeans_hratio soybeans_yield soybeans_production s_d*_b s_d*_p s_d*_g if irrigated_ratio<0.1 & N_year_soybeans>10 & lng>-100 & !missing(s_d0_b), statistics(count mean) columns(statistics)

* corn - weather and laternative drought
tabstat c_prec_b c_prec_p c_prec_g c_pdsi_* c_pmdi_* c_phdi_* c_tbin*b c_tbin*p c_tbin*g if irrigated_ratio<0.1 & N_year_corn>10 & lng>-100 & !missing(c_d0_b), statistics(count mean) columns(statistics) 

* soybeans - weather and laternative drought
tabstat s_prec_b s_prec_p s_prec_g s_pdsi_* s_pmdi_* s_phdi_* s_tbin*b s_tbin*p s_tbin*g if irrigated_ratio<0.1 & N_year_soybeans>10 & lng>-100 & !missing(s_d0_b), statistics(count mean) columns(statistics) 


corr c_d*_b c_d*_p c_d*_g if irrigated_ratio<0.1 & N_year_corn>10 & lng>-100 & !missing(c_d0_b)
corr s_d*_b s_d*_p s_d*_g if irrigated_ratio<0.1 & N_year_soybeans>10 & lng>-100 & !missing(s_d0_b)
